package com.solr;

import java.util.List;

import org.apache.solr.client.solrj.response.QueryResponse;

public class SolrResponse<T> {

  QueryResponse response;
  Class<T>      beanType;
  List<T>       beans;
  Long          numFound;
  Long          start;

  public SolrResponse(QueryResponse response, Class<T> beanType) {
    super();
    this.response = response;
    this.beanType = beanType;
    numFound = response.getResults().getNumFound();
    start = response.getResults().getStart();
    beans = response.getBeans(beanType);
  }

  public QueryResponse getResponse() {
    return response;
  }

  public Class<T> getBeanType() {
    return beanType;
  }

  public List<T> getBeans() {
    return beans;
  }

  public Long getNumFound() {
    return numFound;
  }

  public Long getStart() {
    return start;
  }

}
